#include "array.h"
#include <stdlib.h>

Array* array_new(void)
{
  Array* ret = (Array*) malloc(sizeof(Array));
  ret->count = 0;
  return ret;
}


void array_append(Array* array, void* ptr)
{
  array->count++;
  array->data = (void**) malloc(sizeof(void*) * array->count);
  array->data[array->count - 1] = ptr;
}


void* array_at(Array* array, int pos)
{
  // Todo: add more logic
  return array->data[pos];
}
